package cn.edu.swpu.cins.u_chain.frontend.entity.persistence.user.teacher;

import cn.edu.swpu.cins.u_chain.frontend.entity.dto.user.teacher.TeacherInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class TeacherInfoDB {
    private int teacherId;
    private int userId;
    private String teacherName;
    private int teacherMajorId;
    private int schoolId;
    private int degreeId;

    public TeacherInfoDB(TeacherInfo teacherInfo) {
        this.teacherName = teacherInfo.getTeacherName();
        this.teacherMajorId = teacherInfo.getTeacherMajorId();
        this.schoolId = teacherInfo.getSchoolId();
        this.degreeId = teacherInfo.getDegreeId();
        this.userId = teacherInfo.getUserId();
    }
}
